package com.email.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/email")
public class EmailController {
    /**
     * 第二步发送code到邮箱中
     * @param email
     * @param code
     * @return
     */
    @GetMapping("/{code}")
    public Map sendEmail(@PathVariable String email, @PathVariable String code){
        Map<String,Object> result = new HashMap<>();
        result.put("success","验证码已经发送有效" + email);
        return result;
    }
}
